// 弹窗功能
const modal = document.getElementById("deconstructModal");
const btn = document.getElementById("deconstructBtn");
const closeModal = document.getElementById("closeModal");
const cancelDeconstruct = document.getElementById("cancelDeconstruct");

btn.onclick = function() {
    modal.style.display = "block";
}

closeModal.onclick = function() {
    modal.style.display = "none";
}

cancelDeconstruct.onclick = function() {
    modal.style.display = "none";
}

window.onclick = function(event) {
    if (event.target == modal) {
        modal.style.display = "none";
    }
}